
// Load frame if necessary.

if (window.parent == self)
{
	//get the location
	var hrefTarget = document.location.pathname;

	if (hrefTarget.lastIndexOf("/") != 0)
	{
		hrefTarget = hrefTarget.substring(hrefTarget.lastIndexOf("/")+1);
	}
	document.location.replace("index.html?"+hrefTarget+"&1");
}

function expandTocId(idToExpand) {
	var navdoc = parent.frames[1].window.document;
	var targetNode = navdoc.getElementById(idToExpand);
	if (targetNode != null) {
		targetNode.style.backgroundColor="#dddddd";
		var thisParent = targetNode.parentNode;
		while (thisParent.nodeType != 9) {
			if (thisParent.className == "subList") {
				thisParent.style.display = 'block';
			}
			thisParent = thisParent.parentNode;
		}
	} else {
		//alert("null element");
	}
	return;
}

function removeTocHiglight(idToClear) {
	var navdoc = parent.navwin.window.document;
	var targetNode = navdoc.getElementById(idToClear);
	if (targetNode != null) {
		targetNode.style.backgroundColor="#f8f8f8";
	} else {
		//alert("null element");
	}
	return;
}
